public class Student4 {
        private String name="知遇";
        private  int age=22;
        private String gender="女";  //实例成员就地初始化
        private double score=125;
        private static String classRoom;
        public Student4(){
            System.out.println("不带个参数的构造方法被调用了");  //不带参数的构造方法
        }
        {
            this.name="小宁";
            this.age=21;
            this.gender="男";       //实例代码块
            this.score=106;
            System.out.println("实例代码块被调用了");
        }
        static {
            classRoom="204-15";
            System.out.println("静态代码块被调用了"); //静态代码块
        }
        public void show(){
            System.out.println(name+","+age+","+gender+","+score+","+classRoom);
        }

        public static void main(String[] args) {
            Student4 v= new Student4();
            v.show();
        }
    }

